@Deepak_Kv the documentation link from @SatheeskannaK should help.
Couple things to understand:
1) You should configure the data source as a custom action rather than a data source. The custom action response can be used for personalization.
2) The custom action response payload can be leveraged in email or other AJO channels by going to personalization and navigating to contextual attributes and then selecting the action.
3) You may need to first map the dynamic variable to complete the query before you can leverage the response in personalization.