equation IF to evaluate text

Is there a way to have custom properties / equations work together to evaluate a specific text?

My goal is to have an annotation on a drawing be set to either "L" or "W" based on the value of "Grain Direction" variable (which is calculated to either 0 or 1).

What is the best way to handle this without design tables or BOM tables?

SolidworksParts And Features