Ja, du kan lave en sag:
select case when noOfGirls=0 then noOfBoys
else round(noOfBoys/noOfGirls) end as ration
from student;
Men du vil sikkert gerne:
select case when noOfGirls=0 then 1
else round(noOfBoys/noOfGirls) end as ration
from student;