Pay or Play...
Sounds like dirty contacts to me. You can replace the switch, but brace yourself: they're pretty expensive.
I had the same problem a few years back and I disassembled, cleaned, and reassembled the switch, which completely fixed the problem. (I have to warn you that if you decide to go this route, you're in for quite an adventure in puzzle-solving: the switch is a veritable Rube Goldberg device, filled with an assortment of springs and ball bearings that essentially explode as soon as you open the thing up.)
When I first popped mine open, I used every four letter word I knew and assumed I was sunk. But after I regained my composure, I collected the assorted parts, sat down at my well-lighted kitchen table, and using a tweezers and a lot of patience, figured out the contraption. (As I began to understand the way the thing works, I couldn't help but marvel at the engineering. Quite remarkable!) Eventually I succeeded, and the sense of accomplishment was great!
Anyway, the choice is yours: "Pay or Play". Should you decide to attempt doing-it-yourself, then be sure to open the unit in a restricted area so you can readily retrieve the tiny BB's and springs that will inevitably go flying. (Lose one and you're cooked!)
If you need help, just ask and I'll provide you with the benefits of my experience (as best as I can remember.)
Good luck, whatever you decide!
1991 560SEL-Euro (145,000 miles)
1989 420SEL (Retired at 325,000 miles)