The below code is datatable and based on Qustion type (property of Question object) user can either select one option or multiple options.
<p:dataTable id="optTable" value="#{indexBean.currentQuestion.options}" var="opt"
selection="#{indexBean.currentQuestion.selectedOpt}" >
<p:column selectionMode="single" rendered="#{indexBean.currentQuestion.question.selectionMode eq 'single'}" />
<p:column selectionMode="multiple" rendered="#{indexBean.currentQuestion.question.selectionMode eq 'multiple'}" />
My problem is how to declare selectedOpt (selection="#{indexBean.currentQuestion.selectedOpt}") in my indexbean so that it can fit for my requirement.
I am not sure what you are trying to accomplish by making one column Single Selection Mode and the other Multiple Selection Mode.
The dataTable has the property selectionMode, column tag does not have such a property (at least not as of 2.2.1).
For an example of how to use the dataTable see the Primefaces Showcase, http://www.primefaces.org/showcase/ui/datatableRowSelectionSingle.jsf