Is there such a device, or do I have to do this using multiple gates? I have a project where it would be handy to have a pair of inputs, and by using a third input change the gate from an AND to an OR gate.
Three 2-input exclusive-OR gates, one placed at each input and one at the output of an AND gate, is another option. An XOR gate acts like a controllable inverter. One input of each XOR is the control input and the other inputs are the signal inputs. When the control input of all XORs are low, the output with be the AND function. When the control input of all XORs are high, the output will be the OR function.