You better read the manual and just play with some code. Also most if not all the official sample projects will have if-else (although, there's no actual 'If' but there is an 'Else')
e.g:
Sprite: myVar1 = 1 -> <do something 1>
Else
Sprite: myVar1 = 2 -> <do something 2>
Else
Sprite: myVar1 = 3 -> <do something 3>
etc.