Cannot break from a 'while' loop within the 'If' statement

Hi guys,
I am very new to the arduino programming. I am currently trying to build a system where an led is triggered when a piezo is contacted. I set up 3 leds (Red, Green and Yellow) and a Bluetooth Module so that I can control whether which led is triggered when the piezo is pressed. Below are the codes:

#include <SoftwareSerial.h>

SoftwareSerial Wanderers(10, 11); 
int ledr=13; 
int ledy= 9;
int ledg= 8;
char BTData; 
int threshold = 250;
int val = 0;
void setup() {
  // put your setup code here, to run once:
  Wanderers.begin(9600);
  pinMode(ledr,OUTPUT);
  pinMode(ledy,OUTPUT);
  pinMode(ledg,OUTPUT);

}

void loop() {
  // put your main code here, to run repeatedly:
   if (Wanderers.available()){
BTData=Wanderers.read();

   
   if(BTData== '0'){
   
   digitalWrite(ledr,LOW);
   digitalWrite(ledy, LOW);
   digitalWrite(ledg, LOW);
   
   }
   
  if(BTData== '1'){ 
  while(BTData== '1'){
   val=analogRead(A0);
   if(val>= threshold){
     digitalWrite(ledr, LOW);
     digitalWrite(ledy, LOW);
   digitalWrite(ledg, LOW);
   }
   else if(val<=threshold){
    digitalWrite(ledr, LOW);
    digitalWrite(ledy, LOW);
   digitalWrite(ledg, LOW);
    }
   if (BTData!= '1')
    break;
    
   }
    
  }
  if (BTData=='2'){
  while(BTData== '2'){
   val=analogRead(A0);
   if(val>= threshold){
     digitalWrite(ledr,LOW);
     digitalWrite(ledy, HIGH);
   digitalWrite(ledg, LOW);
   }
   else if(val<=threshold){
    digitalWrite(ledr, LOW);
    digitalWrite(ledy, LOW);
   digitalWrite(ledg, LOW);
    }
   if (BTData != '2')
    break;
    
   }

  }

  if (BTData == '3'){

   while(BTData== '3'){
   val=analogRead(A0);
   if(val>= threshold){
     digitalWrite(ledr, LOW);
     digitalWrite(ledy, LOW);
   digitalWrite(ledg, HIGH);
   }
   else if(val<=threshold){
    digitalWrite(ledr, LOW);
    digitalWrite(ledy, LOW);
   digitalWrite(ledg, LOW);
    }
   if (BTData != '3')
    break;
    
   }
    }

 if (BTData == '4'){
    digitalWrite(ledr, HIGH);
    digitalWrite(ledy, HIGH);
    digitalWrite(ledg, HIGH);
    }
 
  
}

}

Once I send the command from my android to the arduino, it can only trigger only Red, Green, or Yellow led if the piezo is pressed. I can't switch to the other colours of LEDs by sending other commands. It looks like the arduino has looped in the 'while' loop within the if statement.
For example:
I can make the red led triggered by the piezo by sending '1'. If I press'0' , '2' or '3' the red led is still triggered by the piezo unless I switch off the arduino and send the other command so that other colours of led can be triggered.

That's what you did alright.

  if (BTData == '3'){

   while(BTData== '3'){

You are not re-acquiring BTData there, so yes, it will loop.

I would rework somewhat myself, but failing that, check inside each loop for more data, eg. inside the "while":

if (Wanderers.available())
    BTData=Wanderers.read();

Now it will notice the new data arriving.

Thanks for your help mate. It works now =D