Based on the set number, I'm assuming you're using the "Robot Inventor App", and the scratch-based graphical programming language?
If that's the case, then I think you're likely to be limited to what Scratch supports, and I don't believe that includes a native switch statement.
Based on this thread on the Scratch site, you could try using the
when I receive blocks to create a
switch like statement (assuming you don't need too many of them):
Basically, you drop the variable into the broadcast message field, and then set up the receive blocks to kick in when the relevant value is seen (I don't own the set, but was able to play around with the App in "streaming" mode to see control flowing through these blocks)
I've taken this a step further, by using the
join block to combine the
counter variable with a text string, which would allow for more switch statements in different parts of your program: