Luckily replacing the cable is quite easy!
Follow this IFIXIT guide: Apple Thunderbolt Display LCD Replacement taking the display off.
Then jump to this: Apple Thunderbolt Display Teardown. Go to Step 8 to pick up taking the logic board out. At Step 8 just disconnect the fan and follow the guide in taking the rest of the cables off and the board.
In Step 10 you'll still have the Thunderbolt cable on the back side to disconnect which is quite easy! Then work on removing the cable from the displays body and replace it with the new cable.
You have a few choices here. You could just put in a standard Thunderbolt cable alone so you can have a longer cable, or you can get the combo cable with the MagSafe that it came with! The Thunderbolt-MagSafe combo cable is Apple P/N 922-9941
Here's a bit more info if you go with the standard 2m cable:
crwdns2934105:0crwdne2934105:0
crwdns2934113:0crwdne2934113:0
crwdns2915270:0crwdne2915270:0
crwdns2889612:0crwdne2889612:0
2