A switch can only route traffic for a client if the client is sending their L3 traffic to a L3 switch interface. Otherwise, the traffic is going to some other device.
When the switch receives the traffic it will consult its routing table to decide where to send it. It could be sent out the same interface, or a different interface. The next-hop could be a router, MX or something else that then forwards the traffic on somewhere else (like the Internet). It could also be a local machine.