Diverter valves are preferred. They are made by Jandy, Pentair, Hayward, and CMP.
Take your pick basically, Jandy is the original. I like the Pentair.
https://www.amazon.com/Pentair-263029-Diverter-2-Inch-Outside/dp/B002FQJ2YM/
https://www.amazon.com/Pentair-263038-2-Inch-2-Way-Diverter/dp/B004W4TC18/