USB Micro has the following lines:
- VBUS (+5v)
Of these, ID is generally not carried over a cable: It is either shorted to signal ground (host device) or left open (slave device). It does not carry any data.
Both VBus and Ground can be left connected to both endpoints in the scheme, thus reducing the switching requirement to 2 lines, D+ and D-. (Another line for ID if it must be carried across, but never seen that done). This is why USB multiplexer ICs typically carry just 2 channels.
There are several USB 2.0 multiplexer ICs that would do the job, for instance Intersil ISL54200, Maxim MAX4906/4907, or Texas Instruments TS3USB221E.
A TTL-controlled bidirectional analog multiplexer/demultiplexer like the HC4053 may be less expensive but will not work for this purpose, due to data speed requirements and capacitance matching issues.
As noted by others in the comments, USB does not take kindly to endpoints being switched. The USB protocol is not a basic TTL logic connection, it involves identification of the USB device and negotiation of speed (and also current limits). Until this handshake is done, the connection is not done.