How one can change the deflection of a magnetic needle that has been kept near a current carrying wire of a circuit?
By changing the direction of current.
Arrange an electric circuit as shown below and keep it switched off. Bring a pivoted magnetic needle just below the copper wire. Observe the direction of the magnetic needle. Now switch on the circuit and observe the magnetic needle.
If in the first case, the needle deflects in the anti-clockwise direction, then when you reverse the direction of current it will get deflected in the clockwise direction.