Yes, there are many ways: the if/else or the switch statement, these two are for a small number of values.
But if you have a big number of values use an array or std::vector to store values and a function to search.