Ogre's link is perfect for this and is the simplest way to do it.
But, for future reference if you want to look into the more advanced scripting techniques similar to this I thought I'd add on to it a bit.
To expand on the info in the article Ogre linked, you can use this kind of variable system to double as a way to also script the text on your pages to reflect the status of the variables. For example, if you have an optional scene in your story where the player can visit a certain character or not, then you can assign a variable to track whether or not they did so. Then in subsequent scenes, you can use scripting to change key paragraphs on a single page to reflect whether or not they visited the person or whatever other optional action you gave them earlier on in the story. I really like this system just because it can be used both for link direction and on page scripts for varied text. More about that technique
here.
There is also the more advanced scripting where you can write out a script on a single link to automatically filter through which page destination to send them to based on variable scores which is explained
here.