To do the switching need to use SSR's, Solid State Relays, they can react in one half of a cycle. However being jumping from phase to phase have some phase overlap issues that would require a added half cycle delay between shut off one phase to the connection of another phase. Plus switching phases on the go will cause some possible spiking issues due to the AC current cycles jumping ahead or back 120 degrees time wise.
However to get a reasonable voltage reading off each phase it would still take a few cycles for the system to accurately detect a low voltage condition and make the needed choice of which phase line is the best next alternative.
might be to use back to back SCR's as the switching elements, with phase and voltage detection to decide on the switching action.
As one phase goes low, turn that phase off and turn the other phase on. If done right this might work if the lines dont go down too often in a day.
It would surely be a good idea to test this in a simulator first however to make sure the switching matrix method works ok. There will most likely have to be phase detection to get the switching action correct.
For the switching, perhaps a micro controller or PROM and associated comparators to make the decisions.
If the switching SCR's dont work because of too much phase overlap, have to use an alternate means such as a transistor with bridge rectifier. I think you would have to analyze the effect of switching one phase to the other first anyway though, the effect on the load. The load may have to take a brief interruption in power. If that's not a problem, SCR's would work ok.