Sometimes we need to auto select options in select option dropdown based on some conditions, say for example , I have already values for select dropdown in database and I want whenever I make a AJAX call my select option dropdowns should be selected as per values in my database.
In simple words, while Editing records functionality via JQuery AJAX:

Following example shows how to do this: