I wanted to know if both forms in my question are correct.
No, Subhajit. You've used "any" incorrectly in (1) and (2). "A," the indefinite article, is the determiner that is needed in (1), and "some" is the determiner needed in (2).
"Any" would only work in (1) and (2) if you were making a previous statement more emphatic for the sake of clarification. And in that case "any" would be stressed -- for example:
Speaker A: Ask me a question and I will do my best to answer it.
Speaker B: Does it need to be a grammar question?
Speaker A: Ask me any question.
It would be natural to use "any question you like" above. You say that you know that structure. Stick with it. There's no need for you to change it to something incorrect and awkwardly non-native.