Oui, vous pouvez faire un cas :
select case when noOfGirls=0 then noOfBoys
else round(noOfBoys/noOfGirls) end as ration
from student;
Mais vous voulez probablement :
select case when noOfGirls=0 then 1
else round(noOfBoys/noOfGirls) end as ration
from student;