Finding a formula for multiple columns where one = true and all others are false

I have a Google spreadsheet with checkboxes in four adjacent columns. I want to get the user to select a checkbox (of their choice) and leave the other default values ​​to "false". The formula below works for two columns – how can I expand it for four columns and allow users to choose which column is "true"?

= SI (D5 = true, false, true)