How to switch an NXT sensor port by a motor port?
That's not possible - sensor ports don't have the hardware to drive motors. That said, you can buy a motor multiplexer like this one to do the job for you, if competition rules allow this.