greencomputing, thank you for input. I achieved the same behaviour in a slightly different way. I apply PCC mangle rules to all packets before routing decision stage and then use custom route rules:
/ip firewall mangle
add action=mark-routing chain=prerouting disabled=no \
in-interface=ether-local new-routing-mark=inet1 passthrough=no per-connection-classifier=\
both-addresses:2/0
add action=mark-routing chain=prerouting disabled=no in-interface=ether-local \
new-routing-mark=inet2 passthrough=no per-connection-classifier=both-addresses:2/1
/ip route rule
add action=lookup disabled=no table=main
add action=lookup-only-in-table disabled=no routing-mark=inet2 table=inet2
add action=lookup-only-in-table disabled=no table=inet1
If there is a route for some dst-address in the main routing table, the address will be resolved there and routing-marks will not be taken into account. Otherwise the address will be resolved in the routing table inet1 or inet2 according to its routing-mark.