Yes, you read it well. The title says switch statements are code smells. You might be thinking, this guy is out of his mind, how on earth could something as useful as a switch be a code smell? As it turns out, it depends on the situation. Let me explain.
You have probably encountered a situation when you had to code multiple else if statements after an if, just to cover all possible conditions. The result was inconvenient to your eyes, too many braces and ifs. Then you suddenly remembered what you were taught: at these junctures, it's more elegant to use a switch statement, so you refactor your code and write different cases for the different conditions. You look at the new code, and feel deep satisfaction: it looks much nicer than it used to.
However, sometimes utilizing switch statements is equivalent to shooting yourself in the leg as you were better off without them. Let's see how you can recognize these situations.