Ooh! A question I might be able to help with!
I can think of several ways to do it. Here's how I'd do it using If:
<<nobr>> /* I like to use nobr so I don't need to worry about lots of whitespace. */
<<if $variableX is 0>>
<<elseif $variableX is 1>>
That'll evaluate the variable before the passage is shown and display the appropriate link.
Switch would also work:
That'll also be evaluated before the passage is rendered.
I'm fairly sure one could also make it evaluate after the passage has rendered but if you're not making changes to the variable in that passage it's not necessary.