if you have a power supply on one wire and want to connect THAT wire to a second wire, you CANNOT do that with the micro-controller.
you CAN use a microcontroller to turn on a relay to connect two wires
you CAN use a microcontroller to control a transistor to allow the power from one power supply on a wire to the thing that gets that power.