Eular Measurements and Rotations.

Have a variable track it and set component rotation to that value:


In your very case: instead of +1 as above, add what the input node axis spit out. You can then use modulo to calc how many quadrant (or whatever) that is.