I stress the word can.
Don't rely solely on the game and how it progressed. Make the story your own. If you wish to use a setting similar to a game you experienced, then by all means use it as long as it doesn't have any copywrite or trademark hinged onto it.
Those of you who play role-playing games may suddenly experience a spark of inspiration when playing a game, and want to use it as a future novel. This may work out, but be careful that each character acts like the character that they are.
Or you can do what I do and use the gaming as pure inspiration to write a compelling story. I don't game very often, but even when I read a good fantasy (or horror or thriller) novel, it too can inspire me in more ways than a good game.