I drew up a quick circuit that basically does what ajb wrote.
You can swap the inverter and mains connections, depending on your preference, shouldn't make any difference (unless you figure in the relay's current draw from the inverter).
The circuit breaker (if it can handle inverter input) could be placed between this circuit and your load, protecting both inverter and mains source from failures. If the inverter has its own protection, just put the breaker on the mains side.
While the circuit above will basically work as a rudimentary means of automatic transfer between a primary and backup power source, it leaves a lot to be desired. Power relays may have a pull-in voltage of 85% of nominal coil voltage, but the dropout voltage is often unspecified, so it's hard to tell at what point the circuit will cut over to the backup source as the primary input falls, so you could very well end up with brownouts at, say, 50% of nominal line voltage passing right through into your load. Whether or not that's a real problem depends on the nature and importance of your load. You'd want something to provide a better-defined changeover point. I'm not sure if there's an easy off-the shelf solution to that, other than just buying a proper automatic transfer switch.
There's also nothing to prevent chatter when the supply voltage is marginal or fluctuating, nor is there a manual override mechanism. This can be overcome by adding a control relay set up to latch the transfer switch in the backup position, which will require a manual reset to revert the system to the primary supply, but allows for manual override or an auxiliary control input as well. You could also use a simple timer that enforces a minimum time the switch must remain on backup power before restoring to the primary supply to keep the system from bouncing back and forth.
Anyway, the OP hasn't actually specified if they want something to automatically transfer power from one source to the other or if this is meant to be a purely manual system, in which case it's all moot for the task in question.