Cast to based on switch

Hello!

Simple question, how would i do to select a cast to based on what selection my switch has?

So if i had an int with the value of 1, only the gamecontroller on pin 1 and the next-following actions would be followed.