Hi @saadiah_ghazali,
You could do the same (by making constraints during data entry) as outlined in the image below:
In the survey tab of your xlsform:
In the choices tab of your xlsform:
Data entry screen as seen in Enketo:
Reference xlsform:
Constaint within Repeat Group.xls (39 KB)
Have a great day!