方法1.
\documentclass{article}
\usepackage{ifthen}
\usepackage{array}
% *********************
% **** 四项选择题 ****
% *********************
% 用法: \choice{ }{ }{ }{ }
\newcommand{\fourch}[4]{%~\hfill(\qquad)\\
\begin{tabular}{*{4}{@{}p{0.25\textwidth}}}(A)~#1 & (B)~#2 & (C)~#3 & (D)~#4\end{tabular}}
\newcommand{\twoch}[4]{%~\hfill(\qquad)\\
\begin{tabular}{*{2}{@{}p{0.5\textwidth}}}(A)~#1 & (B)~#2\end{tabular}\\\begin{tabular}{*{2}{@{}p{0.5\textwidth}}}(C)~#3 & (D)~#4\end{tabular}}
\newcommand{\onech}[4]{%~\hfill(\qquad)\\
(A)~#1 \\ (B)~#2 \\ (C)~#3 \\ (D)~#4}
\newlength\widthcha
\newlength\widthchb
\newlength\widthchc
\newlength\widthchd
\newlength\widthch
\newlength\tabmaxwidth
\setlength\tabmaxwidth{1\textwidth}
\newlength\fourthtabwidth
\setlength\fourthtabwidth{0.25\textwidth}
\newlength\halftabwidth
\setlength\halftabwidth{0.5\textwidth}
\newcommand{\choice}[4]{\settowidth\widthcha{AM.#1}\setlength{\widthch}{\widthcha}
\settowidth\widthchb{BM.#2}
\ifthenelse{\widthch<\widthchb}{\setlength{\widthch}{\widthchb}}{}
\settowidth\widthchb{CM.#3}
\ifthenelse{\widthch<\widthchb}{\setlength{\widthch}{\widthchb}}{}
\settowidth\widthchb{DM.#4}
\ifthenelse{\widthch<\widthchb}{\setlength{\widthch}{\widthchb}}{}
\ifthenelse{\widthch<\fourthtabwidth}{\fourch{#1}{#2}{#3}{#4}}
{\ifthenelse{\widthch<\halftabwidth\and\widthch>\fourthtabwidth}{\twoch{#1}{#2}{#3}{#4}}
{\onech{#1}{#2}{#3}{#4}}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{blindtext}
\begin{document}
\blindtext
\choice{aaaaaa}{bbb}{cccccccccccccccccccccccccc}{dd}
\blindtext
\choice{aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa}{bbb}{cccccccccccccccccccccccccc}{dd}
\blindtext
\choice{aaaaaaaaa}{bbb}{ccccccccccc}{dd}
\end{document}
方法2
\documentclass{article}
%------------- 选择题 --------------%
\usepackage{tasks}%选择题宏包,tasks环境
\settasks{counter-format={tsk[A].},
label-offset={0.4em},
label-align=left,
column-sep={2pt},
item-indent={1pt},before-skip={-0.7em},after-skip={-0.7em}}
% 选择题示例
%\begin{tasks}(4)
% \task
% \task
% \task
% \task
%\end{tasks}
%------------- 选择题 --------------%
\usepackage{blindtext}
\begin{document}
\blindtext
\begin{tasks}(4)
\task $f(x)$
\task $g(x)$
\task $h(x)$
\task $\varphi(x)$
\end{tasks}
\blindtext
\begin{tasks}(2)
\task $f(x)$
\task $g(x)$
\task $h(x)$
\task $\varphi(x)$
\end{tasks}
\blindtext
\begin{tasks}(1)
\task $f(x)$
\task $g(x)$
\task $h(x)$
\task $\varphi(x)$
\end{tasks}
\end{document}