T is greater when the elevator is accelerating upwards.
Explanation:
The tension in the cable is given by the formula
T = m(g+a)
Taking upwards as positive, when the elevator is accelerating upwards a is positive and and g+a is greater than g
So the tension is greater than the weight mg.
But when the elevator is accelerating downwards the, the acceleration a is negative and g +a in the equation above is less than g and as a result the Tension force T is less than the weight w.