First of all, you should specify the programming language you're referring to.
Second, switch
statements are properly used for closed sets of options regarding the switched variable, e.g. enumerations or predefined strings. For this case, I would suggest using the good old if-else
structure.