Display results

Good Evening
I need your help

I want to create an application where through options a result based on a database will come out. My problem is how to connect the database with the options so that the correct result is obtained.

Thank you very much