Yes, this anti-pattern code smell has a name. It’s called primitive obsession.
The refactoring suggested by others also has a name: replace conditional with strategy.
I would add more, but you asked for a name, and now that you know the names, you should have no trouble finding articles, videos, and books that explain these concepts better than I could.