How to Set a variable based on x/y location

How can I set a variable based on location? The object will be on the center Axis, but will be positive or negative at any point.

(X,Y,Z)
(POSITIVE, 0, 0) - North (set variable to 0)
(NEGATIVE, 0, 0) - South (set variable to 1)
(0, POSITIVE, 0) - West (set variable to 2)
(0, NEGATIVE, 0) - East (set variable to 3)

Took a moment to step away and figured it out. leaving the solution incase someone in the future needs it.

Can you please clearly say what thing you need?