This is a little tricky because you're manipulating traffic to the router itself rather than through it.
Assume for this example that your secondary WAN interface is 172.16.1.1/30 and its gateway is 172.16.1.2.
First create an access-list that captures traffic destined to the secondary WAN interface itself.
ip access-list extended backup-gw-list
permit ip any host 172.16.1.1
Next create a route-map that matches traffic to that list and sets the next-hop as its gateway. All other traffic should follow default routing.
route-map local-map permit 10
match ip address backup-gw-list
set ip next-hop 172.16.1.2
route-map local-map permit 20
Now set local policy routing to honor that route-map for traffic destined to the router itself.
ip local policy route-map local-map
For a backup-only scenario where you only need to access the secondary gateway if the primary is down, you can build a probe-and-track on the primary gateway, set your default route to track it, and put in a floating static default to the secondary gateway. Using the route-map should allow you to reach the unit via the secondary at all times regardless of the status of the primary.
If you're doing this remotely, you might want to do a "reload in 15" first in case something gets fat-fingered and you lock yourself out before writing to memory. When all is good, do a "reload cancel" and then write mem.