Afzal, extremely sorry to hear about the IRCC decision.
@comerunning19 is actually right. Even if you wish to proceed legally in this matter, consider ordering your GCMS notes. If nothing, it will give you a sense of WHY your application was rejected - which is exactly what you want to know right now. And if, by chance, the notes do not mention that, then IRCC is on very weak grounds if you decide to take them to court. A visa officer cannot use merely his discretion to refuse your case. You can file a writ of mandamus against IRCC if indeed your case has been rejected without valid justification. The GCMS notes is the starting point of that investigation. Do note, though, that suing IRCC is a long and expensive process. That is not to say that you should not do it. It's just a matter of priorities. For instance if they rejected my case, I most certainly would sue them, because I have cleared every single stage of the process and the visa office has mentioned in my GCMS notes that he is approving my case (and the GCMS notes are government approved legal document that have legal validity in court). I have one more suggestion for you. Somewhere in this thread, someone - and I am forgetting who - did sue IRCC because his case was rejected. And he won, and finally got his PR and is probably in Canada today. You may need to go through each of the 143 pages of this thread one by one to figure out who this candidate was (unless he is reading this and would like to come forward). Get in touch with him and understand the entire legal process and what is involved, what you can expect. My advice to you is twofold, therefore - 1) never take things lying down - you cannot let one bored, disgruntled, underpaid, idiotic visa officer who has probably had a toothache or a fight with his spouse one particular morning (or both) make a stupid decision that could potentially shatter your lifelong dreams and aspirations, 2) choose your battles wisely, fight the one you can win, avoid the one you know you are going to lose. Start with the GCMS notes. Hope this helps.