Check the checkbox base on percentage

I have data tables with checkboxes for each student and check only base on percentages like 100%, 50%, 25%, and 10%. Now when I clicked one of the percentages in the data table will only check for example only 50% automatically checked. Is this possible? And how?