The codes generally denote internal differences to the gearing, build year, and other bits and bobs, with the outer casing being the same across the board.
VW like to mess around with final drive and gear ratios depending on engine torque and rev bands etc, hence the myriad codes. From my own research when I had to replace my manual box, with high torque engines, they use short ratio gears (bigger, more teeth, and therefore can handle more grunt) with tall final drives, and on less torquey engines, they use tall gears (smaller - fewer teeth) with shorter final drivers. The net result at the wheels in terms of final gearing is broadly the same, it just depends on the engine type i.e. EA113 MK5 or EA888 MK6.
It's a bloody minefield mate! Best bet is to always match the code like for like if you can, but if not, most of the petrol DQ250s across MK5 and MK6 platform will work fine......GTI/ED30, Scirocco R, MK6 GTI, VRS, Cupra R etc
Just avoid diesel boxes! The only caveat on the MK6 side is the engine harness might be different. If you can upgrade to a newer DSG, it's probably a good shout as the MK6 ironed out quite a few of the MK5's bugs.