Here's one idea, if you want the level order set from the beginning:
Make a list as a game attribute. When the game is initialized (player clicks "new game" button, etc.), populate the list with a random level order, e.g. [green, blue, yellow, red].
Make another game attribute, "n", the level the player is on.
When the player completes the nth level, switch to scene [get item n from list].