It's decided by whatever you want it to, so long as you can SEXP it.
Use the Branches dealie to sort it out. You have a series of branches that lead to different things. Normally, it'll be like this:
Mission 1
- Branch to Mission 2
- is previous goal true
- Destroy PVD Gadget
- Mission 1
- Repeat Mission 1
- true
...where if they fail the primary goal, they must repeat the mission.
But if you want it to split, you can have it like this:
Mission 1
- Branch to Mission 2
- and
- is previous goal true
- Destroy PVD Gadget
- Mission 1
- is previous goal true
- Bonus All Survive
- Mission 1
- Branch to Mission 2a
- is previous goal true
- Destroy PVD Gadget
- Mission 1
- Branch to Mission 2b
- is previous goal false
- Destroy PVD Gadget
- Mission 1
- Repeat Mission 1
- true
FS2 works down the list. If the player accomplished both goals, they go on to Mission 2. If they only got the primary goal (and you don't need to check if the bonus goal is false, because it will have to be to make it past the first branch) then they go onto Mission 2a. If they failed the primary goal, they go onto Mission 2b. If the goal is incomplete (jumped out early) then they must repeat the mission.
You'll need to set it up in the mission tree thing as well. Missions go in the various tiers; missions that follow other missions go in the lowest tier. Depending on how the campaign for the above example is set up, it could be that Mission 1 leads on to one of the Mission 2 variants which all lead on to a single Mission 3, or individual mission 3s for each branch, or Mission 2b leads on to Mission 2a, which leads on to Mission 2, so Mission 2b would be above Mission 2a which would be above Mission 2, so you could play from one to three mission 2s.
Check the help topic thing in FRED.