Is there some sort of guide to writing SQL statements for modules that use the ACP to set their options?

For example, I'm trying to write the following option but can't figure out how to do it:

- Dropdown menu of: 7 days, 14 days, 21 days, 28 days, 30 days, Other.
- Other: INPUT box for the admin to use.