user38296: const int analogPin1 = A1;
const int analogPin2 = A2;
const int analogPin3 = A3;
const int ledPin = 13;
const int ledPin2 = 7;
const int thresold = 400;
unsigned int x1, x2, x3, fault = 0;
void setup()
{
    pinMode(ledPin, OUTPUT);
    Serial.begin(9600);
}
void Config()
{
    delay(1000);
    Serial.print("ATE0r");
    Response();
    Serial.print("ATr");
    Response();
    Serial.print("AT+CMGF=1r");
    Response();
    Serial.print("AT+CNMI=1,2,0,0,0r");
    Response();
}
void Response()
{
    int count = 0;
    Serial.println();
    while (1) {
        if (Serial.available()) {
            char data = Serial.read();
            if (data == 'K') {
                Serial.println("OK");
                break;
            }
            if (data == 'R') {
                Serial.println("GSM Not Working");
                break;
            }
        }
        count++;
        delay(10);
        if (count == 1000) {
            Serial.println("GSM not Found");
            break;
        }
    }
}
void loop()
{
    int analogValue1 = analogRead(analogPin1);
    int analogValue2 = analogRead(analogPin2);
    int analogValue3 = analogRead(analogPin3);

    if (analogValue1 < thresold) {
        x1 = 1;
        fault = x1;
    }
    if (analogValue2 < thresold) {
        x2 = x1 + 3;
        fault = x2;
    }
    if (analogValue3 < thresold) {
        x3 = x1 + x2 + 5;
        fault = x3;
    }

    switch (fault) {
    case 1:

        digitalWrite(ledPin, HIGH);
        Serial.print("AT+CMGF=1\r");
        delay(1000);
        Serial.print("AT+CMGS=\"+919\"\r");
        delay(1000);
        Serial.print("PHASE 1 HAS GONE");
        delay(1000);
        Serial.write(0x1A);
        delay(1000);
        goto nsr;
        break;

    case 3:

        digitalWrite(ledPin, HIGH);
        Serial.print("AT+CMGF=1\r");
        delay(1000);
        Serial.print("AT+CMGS=\"+919\"\r");
        delay(1000);
        Serial.print("2 HAS GONE");
        delay(1000);
        Serial.write(0x1A);
        delay(1000);
        goto nsr;
        break;

    case 4:
        digitalWrite(ledPin, HIGH);
        Serial.print("AT+CMGF=1\r");
        delay(1000);
        Serial.print("AT+CMGS=\"+919\"\r");
        delay(1000);
        Serial.print("1 AND 2 HAS GONE");
        delay(1000);
        Serial.write(0x1A);
        delay(1000);
        goto nsr;
        break;

    case 5:

        digitalWrite(ledPin, HIGH);
        Serial.print("AT+CMGF=1\r");
        delay(1000);
        Serial.print("AT+CMGS=\"+919\"\r");
        delay(1000);
        Serial.print("3 HAS GONE");
        delay(1000);
        Serial.write(0x1A);
        delay(1000);
        Serial.print("AT+CNMI=2,2,0,0,0");
        goto nsr;
        break;

    case 6:

        digitalWrite(ledPin, HIGH);
        Serial.print("AT+CMGF=1\r");
        delay(1000);
        Serial.print("AT+CMGS=\"+919\"\r");
        delay(1000);
        Serial.print("1 AND 3 HAS GONE");
        delay(1000);
        Serial.write(0x1A);
        delay(1000);
        goto nsr;
        break;

    case 8:

        digitalWrite(ledPin, HIGH);
        Serial.print("AT+CMGF=1\r");
        delay(1000);
        Serial.print("AT+CMGS=\"+919\"\r");
        delay(1000);
        Serial.print("2 AND 3 HAS GONE");
        delay(1000);
        Serial.write(0x1A);
        delay(1000);
        goto nsr;
        break;

    case 10:

        digitalWrite(ledPin, HIGH);
        Serial.print("AT+CMGF=1\r");
        delay(1000);
        Serial.print("AT+CMGS=\"+919\"\r");
        delay(1000);
        Serial.print("ALL 3 HAS GONE");
        delay(1000);
        Serial.write(0x1A);
        delay(1000);
        goto nsr;
        break;

    default:
        x1, x2, x3, fault = 0;
        digitalWrite(ledPin, LOW);
        break;
    }

    x1, x2, x3, fault = 0;
    digitalWrite(ledPin, LOW);
    do {
        int analogValue1 = analogRead(analogPin1);
        int analogValue2 = analogRead(analogPin2);
        int analogValue3 = analogRead(analogPin3);
    } while (analogValue1 < thresold || analogValue2 < thresold || analogValue3 < thresold);
}

do {
    int analogValue1 = analogRead(analogPin1);
    int analogValue2 = analogRead(analogPin2);
    int analogValue3 = analogRead(analogPin3);
} while ((analogValue1 > th) && (analogValue2 > th) && (analogValue3 > th));
}

nsr : if ((analogValue1 > th) && (analogValue2 > th) && (analogValue3 > th))
{

    digitalWrite(ledPin, HIGH);
    Serial.begin(9600);
    Serial.print("\r");
    delay(1000);
    Serial.print("AT+CMGF=1\r");
    delay(1000);
    Serial.print("AT+CMGS=\"+919\"\r");
    delay(1000);
    Serial.print("ALL 3 Phase Restored");
    delay(1000);
    Serial.write(0x1A);
    delay(1000);
    Serial.print("\r");
    delay(1000);
    Serial.print("AT+CMGF=1\r");
    delay(1000);
    Serial.print("AT+CMGS=\"+919\"\r");
    delay(1000);
    Serial.print("ALL 3 Phase Restored");
    delay(1000);
    Serial.write(0x1A);
    delay(1000);

    do {
        int analogValue1 = analogRead(analogPin1);
        int analogValue2 = analogRead(analogPin2);
        int analogValue3 = analogRead(analogPin3);
    } while ((analogValue1 > th) && (analogValue2 > th) && (analogValue3 > th));
}


user31105: Instead of using 
goto nsr

Use a boolean to skip parts you do not want to execute. It is (almost) never a good idea to use goto.
Due to the misalignment of { and } I do not know what you exactly want to execute.

user37799: You want to create separate function nsr and use it instead of goto.
void nsr(void){
  if ((analogValue1 > th) && (analogValue2 > th) && (analogValue3 > th))
  {

    digitalWrite(ledPin, HIGH);
    Serial.begin(9600);
    Serial.print("\r");
    delay(1000);
    Serial.print("AT+CMGF=1\r");
    delay(1000);
    Serial.print("AT+CMGS=\"+919\"\r");
    delay(1000);
    Serial.print("ALL 3 Phase Restored");
    delay(1000);
    Serial.write(0x1A);
    delay(1000);
    Serial.print("\r");
    delay(1000);
    Serial.print("AT+CMGF=1\r");
    delay(1000);
    Serial.print("AT+CMGS=\"+919\"\r");
    delay(1000);
    Serial.print("ALL 3 Phase Restored");
    delay(1000);
    Serial.write(0x1A);
    delay(1000);

    do {
        int analogValue1 = analogRead(analogPin1);
        int analogValue2 = analogRead(analogPin2);
        int analogValue3 = analogRead(analogPin3);
    } while ((analogValue1 > th) && (analogValue2 > th) && (analogValue3 > th));
  }
}


38296: <pre><code>const int analogPin1 = A1;
const int analogPin2 = A2;
const int analogPin3 = A3;
const int ledPin = 13;
const int ledPin2 = 7;
const int thresold = 400;
unsigned int x1, x2, x3, fault = 0;
void setup()
{
    pinMode(ledPin, OUTPUT);
    Serial.begin(9600);
}
void Config()
{
    delay(1000);
    Serial.print("ATE0r");
    Response();
    Serial.print("ATr");
    Response();
    Serial.print("AT+CMGF=1r");
    Response();
    Serial.print("AT+CNMI=1,2,0,0,0r");
    Response();
}
void Response()
{
    int count = 0;
    Serial.println();
    while (1) {
        if (Serial.available()) {
            char data = Serial.read();
            if (data == 'K') {
                Serial.println("OK");
                break;
            }
            if (data == 'R') {
                Serial.println("GSM Not Working");
                break;
            }
        }
        count++;
        delay(10);
        if (count == 1000) {
            Serial.println("GSM not Found");
            break;
        }
    }
}
void loop()
{
    int analogValue1 = analogRead(analogPin1);
    int analogValue2 = analogRead(analogPin2);
    int analogValue3 = analogRead(analogPin3);

    if (analogValue1 &lt; thresold) {
        x1 = 1;
        fault = x1;
    }
    if (analogValue2 &lt; thresold) {
        x2 = x1 + 3;
        fault = x2;
    }
    if (analogValue3 &lt; thresold) {
        x3 = x1 + x2 + 5;
        fault = x3;
    }

    switch (fault) {
    case 1:

        digitalWrite(ledPin, HIGH);
        Serial.print("AT+CMGF=1\r");
        delay(1000);
        Serial.print("AT+CMGS=\"+919\"\r");
        delay(1000);
        Serial.print("PHASE 1 HAS GONE");
        delay(1000);
        Serial.write(0x1A);
        delay(1000);
        goto nsr;
        break;

    case 3:

        digitalWrite(ledPin, HIGH);
        Serial.print("AT+CMGF=1\r");
        delay(1000);
        Serial.print("AT+CMGS=\"+919\"\r");
        delay(1000);
        Serial.print("2 HAS GONE");
        delay(1000);
        Serial.write(0x1A);
        delay(1000);
        goto nsr;
        break;

    case 4:
        digitalWrite(ledPin, HIGH);
        Serial.print("AT+CMGF=1\r");
        delay(1000);
        Serial.print("AT+CMGS=\"+919\"\r");
        delay(1000);
        Serial.print("1 AND 2 HAS GONE");
        delay(1000);
        Serial.write(0x1A);
        delay(1000);
        goto nsr;
        break;

    case 5:

        digitalWrite(ledPin, HIGH);
        Serial.print("AT+CMGF=1\r");
        delay(1000);
        Serial.print("AT+CMGS=\"+919\"\r");
        delay(1000);
        Serial.print("3 HAS GONE");
        delay(1000);
        Serial.write(0x1A);
        delay(1000);
        Serial.print("AT+CNMI=2,2,0,0,0");
        goto nsr;
        break;

    case 6:

        digitalWrite(ledPin, HIGH);
        Serial.print("AT+CMGF=1\r");
        delay(1000);
        Serial.print("AT+CMGS=\"+919\"\r");
        delay(1000);
        Serial.print("1 AND 3 HAS GONE");
        delay(1000);
        Serial.write(0x1A);
        delay(1000);
        goto nsr;
        break;

    case 8:

        digitalWrite(ledPin, HIGH);
        Serial.print("AT+CMGF=1\r");
        delay(1000);
        Serial.print("AT+CMGS=\"+919\"\r");
        delay(1000);
        Serial.print("2 AND 3 HAS GONE");
        delay(1000);
        Serial.write(0x1A);
        delay(1000);
        goto nsr;
        break;

    case 10:

        digitalWrite(ledPin, HIGH);
        Serial.print("AT+CMGF=1\r");
        delay(1000);
        Serial.print("AT+CMGS=\"+919\"\r");
        delay(1000);
        Serial.print("ALL 3 HAS GONE");
        delay(1000);
        Serial.write(0x1A);
        delay(1000);
        goto nsr;
        break;

    default:
        x1, x2, x3, fault = 0;
        digitalWrite(ledPin, LOW);
        break;
    }

    x1, x2, x3, fault = 0;
    digitalWrite(ledPin, LOW);
    do {
        int analogValue1 = analogRead(analogPin1);
        int analogValue2 = analogRead(analogPin2);
        int analogValue3 = analogRead(analogPin3);
    } while (analogValue1 &lt; thresold || analogValue2 &lt; thresold || analogValue3 &lt; thresold);
}

do {
    int analogValue1 = analogRead(analogPin1);
    int analogValue2 = analogRead(analogPin2);
    int analogValue3 = analogRead(analogPin3);
} while ((analogValue1 &gt; th) &amp;&amp; (analogValue2 &gt; th) &amp;&amp; (analogValue3 &gt; th));
}

nsr : if ((analogValue1 &gt; th) &amp;&amp; (analogValue2 &gt; th) &amp;&amp; (analogValue3 &gt; th))
{

    digitalWrite(ledPin, HIGH);
    Serial.begin(9600);
    Serial.print("\r");
    delay(1000);
    Serial.print("AT+CMGF=1\r");
    delay(1000);
    Serial.print("AT+CMGS=\"+919\"\r");
    delay(1000);
    Serial.print("ALL 3 Phase Restored");
    delay(1000);
    Serial.write(0x1A);
    delay(1000);
    Serial.print("\r");
    delay(1000);
    Serial.print("AT+CMGF=1\r");
    delay(1000);
    Serial.print("AT+CMGS=\"+919\"\r");
    delay(1000);
    Serial.print("ALL 3 Phase Restored");
    delay(1000);
    Serial.write(0x1A);
    delay(1000);

    do {
        int analogValue1 = analogRead(analogPin1);
        int analogValue2 = analogRead(analogPin2);
        int analogValue3 = analogRead(analogPin3);
    } while ((analogValue1 &gt; th) &amp;&amp; (analogValue2 &gt; th) &amp;&amp; (analogValue3 &gt; th));
}
</code></pre>
 31105: <p>Instead of using </p>

<pre><code>goto nsr
</code></pre>

<p>Use a boolean to skip parts you do not want to execute. It is (almost) never a good idea to use goto.</p>

<p>Due to the misalignment of { and } I do not know what you exactly want to execute.</p>
 37799: <p>You want to create separate function <code>nsr</code> and use it instead of goto.</p>

<pre><code>void nsr(void){
  if ((analogValue1 &gt; th) &amp;&amp; (analogValue2 &gt; th) &amp;&amp; (analogValue3 &gt; th))
  {

    digitalWrite(ledPin, HIGH);
    Serial.begin(9600);
    Serial.print("\r");
    delay(1000);
    Serial.print("AT+CMGF=1\r");
    delay(1000);
    Serial.print("AT+CMGS=\"+919\"\r");
    delay(1000);
    Serial.print("ALL 3 Phase Restored");
    delay(1000);
    Serial.write(0x1A);
    delay(1000);
    Serial.print("\r");
    delay(1000);
    Serial.print("AT+CMGF=1\r");
    delay(1000);
    Serial.print("AT+CMGS=\"+919\"\r");
    delay(1000);
    Serial.print("ALL 3 Phase Restored");
    delay(1000);
    Serial.write(0x1A);
    delay(1000);

    do {
        int analogValue1 = analogRead(analogPin1);
        int analogValue2 = analogRead(analogPin2);
        int analogValue3 = analogRead(analogPin3);
    } while ((analogValue1 &gt; th) &amp;&amp; (analogValue2 &gt; th) &amp;&amp; (analogValue3 &gt; th));
  }
}
</code></pre>
