Both switch statements and polymorphism have their use. In procedural languages (having no polymorphism) switch / if-else statements were the only way to solve a class of problems. So many developers, having accustomed to this way of thinking, continued to use switch even in OO languages, where polymorphism is often a better solution. This is why it is often recommended to avoid / refactor switch statements in favour of polymorphism. Note though that a third option exists too (in languages which support function pointers / lambdas): mapping the identifiers in question to handler functions. This is available in e.g. C which is not an OO language, and C# which is, but not (yet) in Java which is OO too.
At any rate, the best solution is always case dependent. The question is: which option gives you cleaner, more concise, more maintainable code in the long run?
Switch statements can often grow unwieldy, having dozens of cases, making their maintenance hard.