routing based on db item values

How to enable routing if agreement parameter equals 1 to agreement and othwerwise to options ?

See example:

  def select     @imitem = Imitem.find(params[:id])

if (@imitem.update_attributes(params[:agreement])) redirect_to :action => 'agreement', :id => @imitem else render :action => 'options', :id => @imitem end end