Is there a better way to check what a variable equales?

Hello, it depends on the variable to control.