\documentclass[a4paper]{book}
\usepackage{amsthm,amssymb,amsmath,multicol,color,enumitem}
\definecolor{mycolor}{rgb}{0,.43,0}
\usepackage{pgf,tikz}
\usetikzlibrary{arrows}
\usepackage{graphicx}
\usepackage{settobox}
\usepackage{calc}
\newcounter{example}[chapter]


\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\linewidth%
\ifdim\wd\answerb<0.165\linewidth%
\ifdim\wd\answerc<0.165\linewidth%
\ifdim\wd\answerd<0.165\linewidth%
\begin{multicols}{4}
\begin{itemize}[leftmargin=0em,labelsep=2pt]
\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\linewidth%
\ifdim\wd\answerb<0.4\linewidth%
\ifdim\wd\answerc<0.4\linewidth%
\ifdim\wd\answerd<0.4\linewidth%
\begin{multicols}{2}
\begin{itemize}[leftmargin=*]
\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}[leftmargin=*]
\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}[leftmargin=*]
\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}[leftmargin=*]
\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}[leftmargin=*]
\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\linewidth%
\ifdim\wd\answerb<0.4\linewidth%
\ifdim\wd\answerc<0.4\linewidth%
\ifdim\wd\answerd<0.4\linewidth%
\begin{multicols}{2}
\begin{itemize}[leftmargin=*]
\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}[leftmargin=*]
\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}[leftmargin=*]
\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}[leftmargin=*]
\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}[leftmargin=*]
\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\linewidth%
\ifdim\wd\answerb<0.4\linewidth%
\ifdim\wd\answerc<0.4\linewidth%
\ifdim\wd\answerd<0.4\linewidth%
\begin{multicols}{2}[leftmargin=*]
\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}[leftmargin=*]
\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}[leftmargin=*]
\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}[leftmargin=*]
\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}[leftmargin=*]
\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\linewidth%
\ifdim\wd\answerb<0.4\linewidth%
\ifdim\wd\answerc<0.4\linewidth%
\ifdim\wd\answerd<0.4\linewidth%
\begin{multicols}{2}
\begin{itemize}[leftmargin=*]
\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}[leftmargin=*]
\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}[leftmargin=*]
\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}[leftmargin=*]
\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}[leftmargin=*]
\item[\textcolor{mycolor}{1)}] #1
\item[\textcolor{mycolor}{2)}] #2
\item[\textcolor{mycolor}{3)}] #3
\item[\textcolor{mycolor}{4)}] #4
\end{itemize}
\fi\fi
}

\newenvironment{examp}{\stepcounter{example} \vspace*{12pt} \noindent \textbf{مثال \thechapter.~\theexample.}}{}



\newlength{\figlength}
\setlength{\figlength}{0pt}
\newsavebox{\figbox}

\newcommand{\exampfig}[1]{%
\sbox{\figbox}{#1}
\settoboxwidth{\figlength}{\figbox}
\global\figlength=\figlength
}

\newcommand{\exampchoices}[4]{%
\ifdim \figlength>0pt
\begin{minipage}{\textwidth-\figlength}
\answer{#1}{#2}{#3}{#4}
\end{minipage}
\begin{minipage}{\figlength}
\usebox{\figbox}
\end{minipage}
\global\figlength=0pt
\else
\begin{minipage}{\textwidth-\figlength}
\answer{#1}{#2}{#3}{#4}
\end{minipage}
\fi
}

\usepackage{xepersian}
%\settextfont[Scale=1.1]{XB Niloofar}
\begin{document}


\baselineskip=0.75cm
\chapter{مقدمات}
\section{مقدمه}
\begin{examp}
مقدار فشار را به دست آورید؟

\exampchoices{$10 Pa$}{$10 Pa$}{$10 Pa$}{$10 Pa$}

\end{examp}

\begin{examp}
مقدار فشار را به دست آورید؟

\exampfig{
\begin{tikzpicture}
\draw (0,1)--(2,1);
\end{tikzpicture}
}
\exampchoices{$10 Pa$}{$10 Pa$}{$10 Pa$}{$10 Pa$}

\end{examp}

\begin{examp}
مقدار فشار را به دست آورید؟

\exampfig{
\begin{tikzpicture}
\draw (0,1)--(4,1);
\end{tikzpicture}
}
\exampchoices{$10 Pa$}{$10 Pa$}{$10 Pa$}{$10 Pa$}

\end{examp}

\begin{examp}
مقدار فشار را به دست آورید؟

\exampfig{
\begin{tikzpicture}
\draw (0,1)--(6,1);
\end{tikzpicture}
}
\exampchoices{$10 Pa$}{$10 Pa$}{$10 Pa$}{$10 Pa$}

\end{examp}

\begin{examp}
مقدار فشار را به دست آورید؟

\exampfig{
\begin{tikzpicture}
\draw (0,1)--(8,1);
\end{tikzpicture}
}
\exampchoices{$10 Pa$}{$10 Pa$}{$10 Pa$}{$10 Pa$}

\end{examp}

\begin{examp}
مقدار فشار را به دست آورید؟

\exampfig{
\begin{tikzpicture}
\draw (0,1)--(10,1);
\end{tikzpicture}
}
\exampchoices{$10 Pa$}{$10 Pa$}{$10 Pa$}{$10 Pa$}

\end{examp}


\end{document}