That is not a nice thing to do - it means you cannot tell the difference between a student that doesn't exist, and a student that scores zero. However:
IF EXISTS (SELECT mark FROM student WHERE roll=4)
SELECT mark FROM student WHERE roll=4
ELSE
SELECT 0
But you should find a better way to organise your code instead. If nothing else, this is very inefficient!