Check out the thread named:
1992 500E "ASR/limp home mode" problem continued
Best way to spend your money is on diagnosis. The fault codes are stored. Study the stored codes - maybe you'll find the answer there, as it was, even though it was hidden amongst six or seven error codes, on mine. The problem on mine (and on Guido's) was with the safety neutral/shift position indicator switch. You'll recall that with my car, the tech didn't find it until he called in a consultant who had the ThinkPad-based MB diagnostic unit. It showed the problem live; my car was getting so bad I could pretty much expect it to go into "limp" every time I drove it. But as JimF pointed out, it was hidden in the stored codes as well.
1995 E320 Wagon Moonstone Grey/Parchment 106K mi.
2007 E63 AMG Graphite/designo 75K mi