Not 100% sure on this but you could use two TRIACs, connect the gate of one to the 240v supply and the gate of the other to the inverter. You could then add something to pull the gate of the one TRIAC low when the other TRIAC is active. Not sure if this can be done directly with power TRIACs, you may need to convert each to DC and use something like a couple of MOC3062 to control the gates.
This is kind of similar to what andre has recommended. One word of caution though, you will be connecting both Neutral's together which might have undesired effects. I would get some advice from an expert on here before commiting to this design.
If it does turn out you need to keep both neutrals seperate I don't think TRIACs will be much help to you, there can be problems if you trying switching both neuteral and live together.