Interesting that nobody mentioned Borges here. Labyrinthine books are one of the recurring themes in his writing.
In one short story he proposes a kind of reverse CYOA book: A book with many beginnings but only one ending.
In one short story he proposes a kind of reverse CYOA book: A book with many beginnings but only one ending.
Some games work like this (eg Dragon Age: Origins). It's not as mysterious as it sounds.