Well, basic routing is always destination based.
Usually a routing table is pretty simple. One route for the connected subnet - this routes all internal traffic through the interface directly into the network - and one default route for any other IPs that are not in the local subnet.
If you want to route a specific IP address to another gateway, you'll have to add a static route for that. Like "Target a.b.c.d --> gw2" instead of "all but local --> default gw"