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>>
[[link|destination0]]
<<elseif $variableX is 1>>
[[link|destination1]]
<</if>>
<</nobr>>
That'll evaluate the variable before the passage is shown and display the appropriate link.
Switch would also work:
<<nobr>>
<<switch $variableX>>
<<case 0>>
[[link|destination0]]
<<case 1>>
[[link|destination1]]
<</switch>>
<</nobr>>
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.