
Sonic the Hedgehog would jump via the Mega Drive's A B or C button, not "X".
Arguably you could have been playing with a six-button pad which was released in late 1993, and did indeed have an X Y and Z button, although the game wouldn't recognise those without a bit of specific tinkering. The only other way would be if you were playing the game through an emulator with the "X" key as your A/B/C input, or the Ultimate Mega Drive Collection on PS3/360, both of which had an X button on their controllers.