Episodes 2-4 can end in just two ways - either you win the episode and go to the winning path of the next episode or you lose and go to the losing path of the next episode. But inside each episode, there can be a bit of branching depending on the player's performance. This branching doesn't, strictly speaking, affect the ending - it does, however, affect how hard it is to win.
In other words - lose episode 2, you go into episode 3 on the losing path. Lose a few missions on the losing path of episode 3, and you go on the losing path of the losing path of episode 3. From there, you still have a chance to win the episode... but the chance is pretty darn miniscule.
It'll be slightly different in episode 5, though. There, you have three different endings - there's a losing ending, a winning ending, and a middle ending (the middle ending is the book ending - so as you can imagine, we'll be working very hard to make sure that most people never see the winning ending).