My 2002 SLK320 did that once. I drove it 2 miles and stopped for fuel, then when I set off again it refused to change out of 2nd gear. I limped home and used another car instead.
Later that day I tried it again and it was back to normal. I phoned Mercedes who said that it had probably put itself into "emergency mode" and that whatever caused it may already have rectified itself.
I took the car in to be checked and the only fault code it had stored was a faulty brake light switch, but I never found out whether that was related to the problem which triggered the auto gearbox emergency mode.