If you miss an exam for a justifiable reason e.g. in hospital due to an illness or accident then your assessment marks form the basis of an estimate e.g. you will be estimated on your rank and the relative gaps between you and those either side of you (or immediately below if you came first or above if you came last).
You would need all the appropriate certification - doctor's certificates etc and the supervisor of the exams and your principal have to certify that the reason was genuine.
Every exam has some students, who for whatever reason, don't sit the exam and the school's assessment marks are used to give the student an estimate.