Got confused on how to get this requirement in a single statement without using T-SQL. Check this solution even though it is not so elegant, but works great having said what the requirement looks.
Some results have been hidden because they may be inaccessible to you
Show inaccessible results