The aspectratio
option doesn't set any useful flag, apart from the page dimensions. One could check for these dimension pairs or else doing a direct check from the options list; here are two macros defined with the help of expl3
according to the latter strategy.
\documentclass[aspectratio=1610]{beamer}
\usepackage{xparse}
\ExplSyntaxOn
\NewDocumentCommand{\ifaspectratio}{mmm}
{
% Recover the option from those passed to the class
\keys_set:nf { zunbeltz/beameroptions } { \use:c { opt@beamer.cls } }
\str_if_eq:nVTF { #1 } \l_zunbeltz_aspectratio_tl { #2 } { #3 }
}
\NewDocumentCommand{\xifaspectratio}{mO{}}
{
% Recover the option from those passed to the class
\keys_set:nf { zunbeltz/beameroptions } { \use:c { opt@beamer.cls } }
\str_case:Vnn \l_zunbeltz_aspectratio_tl { #1 } { #2 }
}
% We need to define only one key, the other are treated as `unknown'
\keys_define:nn { zunbeltz/beameroptions }
{
aspectratio .tl_set:N = \l_zunbeltz_aspectratio_tl,
aspectratio .initial:n = 43,
unknown .code:n = {},
}
% Generate the variants we need
\cs_generate_variant:Nn \keys_set:nn { nf }
\cs_generate_variant:Nn \str_if_eq:nnTF { nV }
\cs_generate_variant:Nn \str_case:nnn { V }
\ExplSyntaxOff
\begin{document}
\begin{frame}
\ifaspectratio{1610}{We're on 16:10}{We're not on 16:10}
\xifaspectratio{
{169}{We're on 16:9}
{43}{We're on 4:3}
}[None of the above]
\end{frame}
\end{document}
The macro \ifaspectratio
takes three arguments, the ratio which we want to test, the true text and the false text.
The macro \xifaspectratio
is more flexible: it takes one mandatory argument, which is a list of pairs {<ratio>}{<text>}
and an optional argument for a "none of the above" case.

By adding to \keys_define:nn { zunbeltz/beameroptions }
one could define similar macros for checking other options.