Welcome to the forum.
Probably the easiest and cheapest is to use a couple plain Jane ball valves from Home Depot, Lowes, etc. Put a PVC Tee ahead of the filter, ater the pump, and a ball valve in each leg. To dump to the lawn just close the filter valve and open the dump valve. They do make multi-port valves for this purpose but they are sort of specialty items and not found in home improvement stores. Thus more $$$. Once this thread gets into the general forum population someone else may comment on the cost of these multi-port valves.
Al