you will need to use this transistor as a high side switch with a pull up on the output of the 339.
The emitter goes to +ve, collector to the relay, base, via a resistor (around 1k) to the output of the 339. The base should also be connected to +ve via another 1k resistor. The other end of the...