I am familiar with using if else statement but my problem is how to display either if the condition is met.
if ($a == 1) {
echo 'B' OR 'C';  // just for reference
}
I have finally figure this out using nested loop
  if ($a == 1) {
    choiceresult = mt_rand(1,2)
   if (choiceresult == 1) {
      echo 'B';
   }
   if ( choiceresult == 2) {
      echo 'C';
   }
  }
 
     
    