You could do that with a DPDT switch. If you look at the contact arrangement here:
You can see the two separate poles. So the connections on the left hand side are the commons and looking at the top one, in it's normal state the common is connected via an internal contact to 1T. When you flick the switch that connection is broken and the internal contact then connects the common to 2T.
So if you wanted the switch in one position to connect 12V and in the other position connect 110V, you would just connect 110V to the top common, and 12V to the bottom common. You would then connect Battery A to 1P1T and Battery B to 2P2T. So in one position 110V is connected to Battery A with Battery B disconnected, and when you flick the switch Battery A is disconnected and 12V is connected to Battery B.