I remember struggling with this grammar when I was at secondary school. As it is possible to translate the words IF and WITH with the same word in my mother tongue I couldn’t see the difference in English.
To help my students avoid this problem I have created the following mind map and several games. I hope they will help you too.
WHEN or IF – mind map
WHEN or IF – games
The second game is called Hoopshoot. Your task is to choose the correct option and then hit the basket with the ball. Good luck.