The production of hydroxide ions (OH-) makes the solution alkaline.
The other gases are not alkaline:
HCl (hydrogen chloride) dissolves in water to form hydrochloric acid, which is strongly acidic.
N2 (nitrogen) is an inert, unreactive gas that does not dissolve appreciably in water and produces neither acidic nor basic solutions.
NO2 (nitrogen dioxide) dissolves in water to form a mixture of nitric acid and nitrous acid, both of which are acidic.
Exam tip: Ammonia is the only common alkaline gas encountered at this level. Its characteristic pungent smell and ability to turn moist red litmus paper blue are standard identification tests.