Quantum Gates with a Selective Interaction