At the end of the first stage, instead of entering the castle to complete the level, jump over the door and move to the wall on the right. Spin into the wall and hit the third block from the bottom to partially break it. Jump into this gap and keep moving right to move through the wall into a small room. Once you do, a menu will pop up allowing you to access any stage in the game.