Using AJAX to run SQL statement and populate dropdown

You are giving your own solution here. Use the onchange event for the dropdowns, or the .change event in the jquery API.

Otherwise, this is called ‘cascading’ – dropdowns.

Also, I don’t think this has anything to do with wordpress. Similar to this question