\documentclass{article}
\usepackage{multicol,color}
\definecolor{mycolor}{rgb}{0,.43,0}
\definecolor{mycolorq}{RGB}{255,0,0}
\newcounter{question}
\newenvironment{mcquestions}{\begin{itemize}}{\end{itemize}}
\newcommand{\question}[1]{\stepcounter{question}\item[\textcolor{mycolorq}{\thequestion.}] #1}
\newsavebox{\answera}
\newsavebox{\answerb}
\newsavebox{\answerc}
\newsavebox{\answerd}
\newcommand{\answer}[4]{%
\sbox\answera{#1}%
\sbox\answerb{#2}%
\sbox\answerc{#3}%
\sbox\answerd{#4}%
\ifdim\wd\answera<0.165\textwidth%
\ifdim\wd\answerb<0.165\textwidth%
\ifdim\wd\answerc<0.165\textwidth%
\ifdim\wd\answerd<0.165\textwidth%
\begin{multicols}{4}
\begin{itemize}
\item[\textcolor{mycolor}{1)}] \usebox{\answera}
\item[\textcolor{mycolor}{2)}] \usebox{\answerb}
\item[\textcolor{mycolor}{3)}] \usebox{\answerc}
\item[\textcolor{mycolor}{4)}] \usebox{\answerd}
\end{itemize}
\end{multicols}
\else%
\ifdim\wd\answera<0.4\textwidth%
\ifdim\wd\answerb<0.4\textwidth%
\ifdim\wd\answerc<0.4\textwidth%
\ifdim\wd\answerd<0.4\textwidth%
\begin{multicols}{2}
\begin{itemize}
\item[\textcolor{mycolor}{1)}] \usebox{\answera}
\item[\textcolor{mycolor}{3)}] \usebox{\answerc}
\item[\textcolor{mycolor}{2)}] \usebox{\answerb}
\item[\textcolor{mycolor}{4)}] \usebox{\answerd}
\end{itemize}
\end{multicols}
\else
\begin{itemize}
\item[\textcolor{mycolor}{1)}] #1
\item[\textcolor{mycolor}{2)}] #2
\item[\textcolor{mycolor}{3)}] #3
\item[\textcolor{mycolor}{4)}] #4
\end{itemize}
\fi
\else
\begin{itemize}
\item[\textcolor{mycolor}{1)}] #1
\item[\textcolor{mycolor}{2)}] #2
\item[\textcolor{mycolor}{3)}] #3
\item[\textcolor{mycolor}{4)}] #4
\end{itemize}
\fi
\else
\begin{itemize}
\item[\textcolor{mycolor}{1)}] #1
\item[\textcolor{mycolor}{2)}] #2
\item[\textcolor{mycolor}{3)}] #3
\item[\textcolor{mycolor}{4)}] #4
\end{itemize}
\fi
\else
\begin{itemize}
\item[\textcolor{mycolor}{1)}] #1
\item[\textcolor{mycolor}{2)}] #2
\item[\textcolor{mycolor}{3)}] #3
\item[\textcolor{mycolor}{4)}] #4
\end{itemize}
\fi\fi
\else
\ifdim\wd\answera<0.4\textwidth%
\ifdim\wd\answerb<0.4\textwidth%
\ifdim\wd\answerc<0.4\textwidth%
\ifdim\wd\answerd<0.4\textwidth%
\begin{multicols}{2}
\begin{itemize}
\item[\textcolor{mycolor}{1)}] \usebox{\answera}
\item[\textcolor{mycolor}{3)}] \usebox{\answerc}
\item[\textcolor{mycolor}{2)}] \usebox{\answerb}
\item[\textcolor{mycolor}{4)}] \usebox{\answerd}
\end{itemize}
\end{multicols}
\else
\begin{itemize}
\item[\textcolor{mycolor}{1)}] #1
\item[\textcolor{mycolor}{2)}] #2
\item[\textcolor{mycolor}{3)}] #3
\item[\textcolor{mycolor}{4)}] #4
\end{itemize}
\fi
\else
\begin{itemize}
\item[\textcolor{mycolor}{1)}] #1
\item[\textcolor{mycolor}{2)}] #2
\item[\textcolor{mycolor}{3)}] #3
\item[\textcolor{mycolor}{4)}] #4
\end{itemize}
\fi
\else
\begin{itemize}
\item[\textcolor{mycolor}{1)}] #1
\item[\textcolor{mycolor}{2)}] #2
\item[\textcolor{mycolor}{3)}] #3
\item[\textcolor{mycolor}{4)}] #4
\end{itemize}
\fi
\else
\begin{itemize}
\item[\textcolor{mycolor}{1)}] #1
\item[\textcolor{mycolor}{2)}] #2
\item[\textcolor{mycolor}{3)}] #3
\item[\textcolor{mycolor}{4)}] #4
\end{itemize}
\fi\fi
\else
\ifdim\wd\answera<0.4\textwidth%
\ifdim\wd\answerb<0.4\textwidth%
\ifdim\wd\answerc<0.4\textwidth%
\ifdim\wd\answerd<0.4\textwidth%
\begin{multicols}{2}
\begin{itemize}
\item[\textcolor{mycolor}{1)}] \usebox{\answera}
\item[\textcolor{mycolor}{3)}] \usebox{\answerc}
\item[\textcolor{mycolor}{2)}] \usebox{\answerb}
\item[\textcolor{mycolor}{4)}] \usebox{\answerd}
\end{itemize}
\end{multicols}
\else
\begin{itemize}
\item[\textcolor{mycolor}{1)}] #1
\item[\textcolor{mycolor}{2)}] #2
\item[\textcolor{mycolor}{3)}] #3
\item[\textcolor{mycolor}{4)}] #4
\end{itemize}
\fi
\else
\begin{itemize}
\item[\textcolor{mycolor}{1)}] #1
\item[\textcolor{mycolor}{2)}] #2
\item[\textcolor{mycolor}{3)}] #3
\item[\textcolor{mycolor}{4)}] #4
\end{itemize}
\fi
\else
\begin{itemize}
\item[\textcolor{mycolor}{1)}] #1
\item[\textcolor{mycolor}{2)}] #2
\item[\textcolor{mycolor}{3)}] #3
\item[\textcolor{mycolor}{4)}] #4
\end{itemize}
\fi
\else
\begin{itemize}
\item[\textcolor{mycolor}{1)}] #1
\item[\textcolor{mycolor}{2)}] #2
\item[\textcolor{mycolor}{3)}] #3
\item[\textcolor{mycolor}{4)}] #4
\end{itemize}
\fi\fi
\else
\ifdim\wd\answera<0.4\textwidth%
\ifdim\wd\answerb<0.4\textwidth%
\ifdim\wd\answerc<0.4\textwidth%
\ifdim\wd\answerd<0.4\textwidth%
\begin{multicols}{2}
\begin{itemize}
\item[\textcolor{mycolor}{1)}] \usebox{\answera}
\item[\textcolor{mycolor}{3)}] \usebox{\answerc}
\item[\textcolor{mycolor}{2)}] \usebox{\answerb}
\item[\textcolor{mycolor}{4)}] \usebox{\answerd}
\end{itemize}
\end{multicols}
\else
\begin{itemize}
\item[\textcolor{mycolor}{1)}] #1
\item[\textcolor{mycolor}{2)}] #2
\item[\textcolor{mycolor}{3)}] #3
\item[\textcolor{mycolor}{4)}] #4
\end{itemize}
\fi
\else
\begin{itemize}
\item[\textcolor{mycolor}{1)}] #1
\item[\textcolor{mycolor}{2)}] #2
\item[\textcolor{mycolor}{3)}] #3
\item[\textcolor{mycolor}{4)}] #4
\end{itemize}
\fi
\else
\begin{itemize}
\item[\textcolor{mycolor}{1)}] #1
\item[\textcolor{mycolor}{2)}] #2
\item[\textcolor{mycolor}{3)}] #3
\item[\textcolor{mycolor}{4)}] #4
\end{itemize}
\fi
\else
\begin{itemize}
\item[\textcolor{mycolor}{1)}] #1
\item[\textcolor{mycolor}{2)}] #2
\item[\textcolor{mycolor}{3)}] #3
\item[\textcolor{mycolor}{4)}] #4
\end{itemize}
\fi\fi
}
\usepackage{xepersian}
\settextfont{Yas}
%%%%%%%%%%%%
\ExplSyntaxOn
\cs_set_eq:NN
\etex_iffontchar:D
\tex_iffontchar:D
\cs_undefine:N \c_one
\int_const:Nn \c_one { 1 }
\ExplSyntaxOff
\setdigitfont{Yas}
\begin{document}
\begin{mcquestions}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\question{حاصل $2+3$ کدام است؟}
\answer{$\pi$}{$2\pi$}{$-\pi$}{$5$}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\question{%
 کدام گزینه درست است؟}

\answer
{$\frac{-x}{x^2-1}$}
{$\frac{-xf(x+y)}{1+(1+x)(x+y)}$}
{$\frac{-sT(s+k)(s+1)}{e^{Ts}+(1+s)(s+k)}$}
{$\frac{-sT(s+k)}{1+(1+s)(s+k)}$}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\question{%
	کدامیک از عبارات زیر در مورد سیتم کنترل مدار بسته زیر صحیح نیست؟}
\answer{%
	حساسیت $G$ نسبت به $K$ برابر با واحد است}
{%
	حساسیت $G$ نسبت به $\infty$ برابر با $\frac{-\infty}{s+\infty}$ است}
{%
	حساسیت $H$ نسبت به $\beta$ برابر با واحد است حساسیت $H$ نسبت به $\beta$ برابر با واحد است حساسیت $H$ نسبت به $\beta$ برابر با واحد است}
{%
	حساسیت $T(s)$ نسبت به $\infty$ برابر با $\frac{-2s}{s^2+2s+10}$ است}


\end{mcquestions}
\end{document}
