Perl 5 -p, 50 4949 48 bytes
s/.{5} (.=)?/:/g;s/if.(.*?)\)(.=)?/\1?/g;$_=$2.$_
s/if.(.*?)\)(.=)/\2\1?/g;s/.if./?/g;s/;.{6}=/:/g
The 48 byte version is inspired by Neil's Retina answer.
Explanation
# Replace any 5 chars followed by space and possibly an assignment
# like "x=" with a colon. Since whitespace is only allowed after
# "else" and "else" is always preceded by ";", this is the same as
# matching ";else (.=)?", but one byte shorter.
s/.{5} (.=)?/:/g;
# Replace "if(expr)" possibly followed by an assignment like "x="
# with "expr?".
s/if.(.*?)\)(.=)?/\1?/g;
# Prepend an assignment like "x=" from the final match.
$_=$2.$_
# Replace "if(e1)if(e2)x=" with "x=e1)if(e2?"
s/if.(.*?)\)(.=)/\2\1?/g;
# Replace ")if(" with "?"
s/.if./?/g;
# Replace ";else x=" with ":"
s/;.{6}=/:/g
Old 49 byte solution
s/.{5} (.=)?/:/g;s/if.(.*?)\)(.=)?/\1?/g;$_=$2.$_