By Ash-Shaykh Mash'hoor Hasan - hafidha-huLlaah
Question: What is the ruling of saying Allaahu A'alam [Allah knows best] despite knowing the response [to the question]?
Answer: That is, if someone asks you: how many are the obligatory prayers per day?
Then, I answer, five obligatory prayers waLlahu A'alam.
Is this good?
That is a mistake!
I'm I right?
No, I’m not right.
The scholars say: There are things that you can say [Allaahu A'alam] to likewise there are things that you can say [wa biLlaahit Tawfeeq - Only Allaah grants sucess] to.
If an individual asks you a question and the answer is unanimously agreed upon and necessarily known in the deen, you should say: Wa biLlaahit Tawfeeq, we should not say: Allaahu A'alam.
We should not say: Zinaa is prohibited, Allaahu A’alam, rather we would say; Zinaa is prohibited wa biLlaahit Tawfeeq.
[Mullah] Aliyy Qaaree - rahimahuLlahu - said in his book Dhamm Al 'Awaarid fee Dhamm Ar Rawaafeed. He said:
If a Mufti is asked about an issue that is unanimously agreed upon and necessarily known in the deen, he should say: Wa biLlaahit Tawfeeq.
But on the issue that has difference of opinions, that it needs an expression of opinions, and the Mufti knows the reply, he should say; Allaahu Ta'aalaa A'alam.
Source: Majlis Fatawa Al Jumu’ah (Of Shaykh Mashhuur Hasan Aal Salmaan Abuu 'Ubaydah).
Jumadaa Al Aakhirah 7, 1439[February 23, 2018 C.E]