Can I terminate the questionnaire after providing a warning message based on a selection from categorical single question?

Can I terminate the questionnaire after providing a warning message based on a selection from categorical single question?

Yes. Most typical situation is “Do you agree to be interviewed? (Y/N)”.

Is there a feature that automatically terminates the survey based on selection on the warning message? where can I learn about it?

This could be achieved by questionnaire design. Suppose, as Sergiy suggests, you have a Y/N question about consent to be interviewed. Make all subsequent sections and questions conditionally enabled only if consent is given.