There was this Star Wars book I used to read back in middle school. It was about you being a trooper, and you got to decide what you did - i.e. commander, demolitions, etc. There were multiple endings. That's all I really remember of it. If any of you know, please let me know.
Could this be The Lost Legion, one of the books in the series Star Wars: the Clone Wars Decide Your Destiny?
The blurb for it reads:
Do you have what it takes to be a clone trooper in the Republic Army? In this Decide Your Destiny story you can choose from multiple characters, such as medic, commander or demolitions expert, and dozens of paths to create your own adventure. With over twenty-five different endings, every time you read the book it'll be a whole new adventure.
If it's not this one, it might be one of the others in the series.