Answer for all
It depends
More generally
Sometimes they will be identical, other times they might miss songs due to licensing or something, other times you might get longer versions, other times you might a remix, other times you will get higher quality version (the little DS digital to analogue converter was hardly good and several devs played to that, on the other hand you may want that rather than the "improved" version) and other times you get things like
Better or worse... I am not aware of so many game sountracks that hosed up it like you get for anime dvds and such where they do a piss poor job of transferring things and you might as well stick with the TV rips. The only real problem most face is the licensing thing that might see certain tracks, or indeed just tracks they do not think will be popular (A CD is what 80 minutes, a game can easily have some 25 tracks of 4 odd minutes each...) do not make the cut.
Which is which? You might not know unless you had them there to compare.
How to rip is as varied as the consoles themselves. Audio hacking was traditionally considered one of the harder areas for hacking but in recent times on recent systems it is less troubling, said older systems can still pose a problem though as things often got custom made from the ground up for it. Broadly speaking there are two approaches
1) Ripping to a more conventional format
2) Emulated audio player. If you have ever seen a NSF file for a NES game then you have seen this.
A hybrid of the two methods does occasionally get seen, mostly in some of the lesser methods of SSEQ audio playback for the DS. You may occasionally see "simple" software tools to try to rip audio they are not considered reference/archive grade by most, however they may well get things good enough to have for ringtones and background music. Major exception being the CD based systems which might well be conventional CD audio tracks and ripped with tools like exact audio copier or whatever the kids are using to rips CDs these days.
A nice place for general systems
http://www.hcs64.com/mboard/forum.php
If you want GBA, DS, 3ds, Wii, GC or possibly some PSP stuff then people around here can point you in the right direction as there are quite a few people versed in it. There are some silly things happening in audio ripping as well unfortunately, one I saw a little while back being some of the stuff people were attempting for megadrive/genesis audio ripping.