Hi,
HCl + red cabbage indicator = red colour
Reason : Red cabbage indicator gives red colour in acidic medium.
NaOH + red cabbage indicator = greenish - yellow colour.
Reason : Red cabbage indicator gives greenish - yellow colour in basic medium.
Sugar solution + red cabbage indicator = purple colour
Reason : Sugar solution is neutral so Red cabbage indicator gives purple colour.
Regards