All perfect praise be to Allah, the Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
If the teacher gave you this mark unjustly, then you should go to him and inform him that he did not ask you anything in the test, because if you do not do so, then you are considered a cheater.
However, if the teacher gave you this mark with just cause, because the evaluation of students is not limited to asking questions to the students, and it was due to other criteria that he noticed in you, then, in that case you are not a cheater and there is no sin on you for the marks which he gave you.
In any case, if you obtain the certificate and used it to got a permissible job and you do the job as required, then your earning is lawful, Allah willing. For more benefit, please refer to fatwa 355567.
Allah knows best.