tage choices based on database values

I just don’t know how to make that code. Do you have an idea?