I have found the answer. I used the following code to get this done
// **Handling Checkboxes (last question) separately**
// Fetch checkbox values and filter them based on the options available in the form. var form = FormApp.openById('1gFmmKPZ72O3l1hl93_rxhXwezPVqxNvGISEi7wnDP_o'); // Form ID var checkboxesItem = form.getItems(FormApp.ItemType.CHECKBOX)[0].asCheckboxItem();