\edef\xxx{\ifnum1>0 \let\next=\bold \else \let\next=\slant \fi
  \next {some text} rest of the text}