SN74HC138 demultiplexer. How do I implement a switch?
Just add a second NPN as an inverter.







simulate this circuit &ndash; Schematic created using CircuitLab

Adjust resistor values and add speed-up caps and/or Schottky clamps to meet your speed and current requirements.