It is with alot of shame that I say this... but I havn't played Baldurs gate, neverwinter nights or jade empire. So, out of kotor, mass effect and dragon age (sonic chronicles doesn't count right?), I'll say this:
I prefer the genre of Dragon age (fantasy, swords, magic) over star wars and sci-fi. I think they did a hell of a good job on the story. The one thing that bugs me the most in dragon age is the approval system, I think the system in knights of the old republic and mass effect was much better.
As for the story, it's almost a tie. I've always been a star wars fan, and in my opinion the search for the star forge beats all the star wars movies. I've never really liked sci-fi (I do not really consider star wars "sci-fi"... it's more like... sci-fi fantasy

if that makes any sense), but Mass Effect had me captivated. It was easy to get into, and once you got into it you were stuck. I couldn't get the game off my mind once I started it, which is good. The ending was great, too, and it left alot to look forward too. Dragon age had the perfect genre, and a great story. This game, too, had me captivated. The game raised many question marks too, the info we could find in the codex wasn't 100% correct, so it left us alot to speculate for.
As for the gameplay, I'll have to say it's Dragon Age > Mass Effect > Kotor. If Kotor was made today, I think the combat system would've been ten times better. I liked the system it used though, it explained abilities through dice rolls.
And the companions... as I mentioned, I didn't like the approval system in dragon age, but the characters and their stories were awesome. Knights of the old republic had some great characters too (Carth, Bastila, Mission, Jolee, HK-47, those are ones you can't forget). I think I liked the companions the least in mass effect, not sure why. It's not that they weren't well executed, I just prefer the characters in dragon age and kotor. Then who wins between kotor and dragon age? Hm... not sure if I can answer that one.
As for the atmosphere in the game, kotor wins on this one. While you had to hurry to stop Malak, no one could expect you to just find the star forges. It felt like you had time to do side quests if you wanted to. The companions were supportive too, and the music in the ebon hawk was homey

... In both Dragon Age and Mass Effect, it felt like you really hadn't time to do side quests. I only did them because I was curious, the first round I completed the game I ignored them, because I roleplayed.
As for the bad guys, the reapers probably win in this subject. Because we know so little of them, except that they have butchered all living things in the galaxy several times over. I'm really curious about mass effect 2, if we'll get to know more about them.
[Mild Spoilers]The blight were mindless, but we know little of their origin. Where do they come from and why do they seek the archdemons etc etc. The civil war was the best part in dragon age, to be honest.
[/Spoilers off]Malak and his sith fleet was pretty badass too, but he was never the real threat. I think he made a poor leader for the sith, and his betrayal was rather... Cowardly.
And last, the hero. Jedi/former sith lord, Grey Warden, Spectre. Being a spectre was pretty cool, and there was no real downside to it. Grey wardens, however, pay a pretty big price for what they are, and what they are meant to do. Wont say more than that. Then, being a jedi is always fun... the hero was definitely big in kotor, and pretty big in mass effect to, where in dragon age, they were a nobody with a pretty sad origin. But I think I prefer the grey warden, I like that they work themselves up from a nobody -> someone important.
It's really hard to say which game is the best, since they are all good in their own ways. I think I'll go with dragon age though, mainly because of the genre... but what's "best" doesn't matter to me, what matters is that they are all good games. Now I shall admire this wall of text, and then take a silent bow. *bows*