how do I go the the specific case directly if sentence is satisfied

#include "Arduino.h"
#if !defined(SERIAL_PORT_MONITOR)
  #error "Arduino version not supported. Please update your IDE to the latest version."
#endif

#if defined(SERIAL_PORT_USBVIRTUAL)
  // Shield Jumper on HW (for Leonardo and Due)
  #define port SERIAL_PORT_HARDWARE
  #define pcSerial SERIAL_PORT_USBVIRTUAL
#else
  // Shield Jumper on SW (using pins 12/13 or 8/9 as RX/TX)
  #include "SoftwareSerial.h"
  SoftwareSerial port(12, 13);
  #define pcSerial SERIAL_PORT_MONITOR
#endif

#include "EasyVR.h"

EasyVR easyvr(port);

//Groups and Commands

enum Groups
{
 
  GROUP_0  = 0,
  GROUP_1  = 1,
};
 
enum Group0
{
  G0_SERI = 0,
};
 
enum Group1
{
  G1_LEDON = 1,
  G1_LEDOFF = 0,
};

int8_t group, idx;
unsigned long time;

void setup()
{
  // setup PC serial port
  pcSerial.begin(9600);

   pinMode(8, OUTPUT);
   pinMode(9, OUTPUT);
   time = millis();
   
   

  // bridge mode?
  int mode = easyvr.bridgeRequested(pcSerial);
  switch (mode)
  {
  case EasyVR::BRIDGE_NONE:
    // setup EasyVR serial port
    port.begin(9600);
    // run normally
    pcSerial.println(F("---"));
    pcSerial.println(F("Bridge not started!"));
    break;
    
  case EasyVR::BRIDGE_NORMAL:
    // setup EasyVR serial port (low speed)
    port.begin(9600);
    // soft-connect the two serial ports (PC and EasyVR)
    easyvr.bridgeLoop(pcSerial);
    // resume normally if aborted
    pcSerial.println(F("---"));
    pcSerial.println(F("Bridge connection aborted!"));
    break;
    
  case EasyVR::BRIDGE_BOOT:
    // setup EasyVR serial port (high speed)
    port.begin(115200);
    // soft-connect the two serial ports (PC and EasyVR)
    easyvr.bridgeLoop(pcSerial);
    // resume normally if aborted
    pcSerial.println(F("---"));
    pcSerial.println(F("Bridge connection aborted!"));
    break;
  }

  while (!easyvr.detect())
  {
    Serial.println("EasyVR not detected!");
    delay(1000);
  }

  easyvr.setPinOutput(EasyVR::IO1, LOW);
  Serial.println("EasyVR detected!");
  easyvr.setTimeout(5);
//�L :  easyvr.setLanguage(%1!d!);

  group = EasyVR::TRIGGER; //<-- start group (customize)
}

void action();

void loop()
{


  unsigned long time2 = millis();
  if(time2 - time >= 8000)
  {
     // I want to go the case G1_LEDOFF:
  }
  easyvr.setPinOutput(EasyVR::IO1, HIGH); // LED on (listening)

  Serial.print("Say a command in Group ");
  Serial.println(group);
  easyvr.recognizeCommand(group);

  do
  {
    // can do some processing while waiting for a spoken command
  }
  while (!easyvr.hasFinished());
  
  easyvr.setPinOutput(EasyVR::IO1, LOW); // LED off

  idx = easyvr.getWord();
  if (idx >= 0)
  {
    // built-in trigger (ROBOT)
    // group = GROUP_X; <-- jump to another group X
    return;
  }
  idx = easyvr.getCommand();
  if (idx >= 0)
  {
    // print debug message
    uint8_t train = 0;
    char name[32];
    Serial.print("Command: ");
    Serial.print(idx);
    if (easyvr.dumpCommand(group, idx, name, train))
    {
      Serial.print(" = ");
      Serial.println(name);
    }
    else
      Serial.println();
    easyvr.playSound(0, EasyVR::VOL_FULL);
    // perform some action
    action();
  }
  else // errors or timeout
  {
    if (easyvr.isTimeout())
      Serial.println("Timed out, try again...");
    int16_t err = easyvr.getError();
    if (err >= 0)
    {
      Serial.print("Error ");
      Serial.println(err, HEX);
    }
 
  }
}


void action()
{
    digitalWrite(9,LOW);
    switch (group)
    {
case GROUP_0:
      switch (idx)
      {
           case G0_SERI:

    

      // if whisper , slowly Led On
         for(int i = 0; i<16; i++)
         {        
              analogWrite(9,i);
              delay(20);   
          
         }
        // write your action code here
        static unsigned time = millis();
          group = GROUP_1; //&amp;lt;-- or jump to another group X for composite commands
          
        break;
      }
      
      break;


      
case GROUP_1:

      switch (idx)
      { 
        case G1_LEDON:
        // write your action code here
         group = GROUP_0; 
         
        digitalWrite(8, HIGH);   // set the LED on
         group = GROUP_1;
         
         for(int i = 0; i<256; i++)
         {
          analogWrite(9,i);
          delay(20);
         }
         
        break;
         
        
      case G1_LEDOFF:
        // write your action code here

        
        group = GROUP_0; //&amp;lt;-- or jump to another group X for composite commands
        
        
        digitalWrite(8, LOW);    // set the LED off
        
        for(int i=255; i>=0; i--)
        {
          analogWrite(9,i);
          delay(20);
        }
        break;
         
        
      }
      break;
    }
}

hello sir

in Line 109, I used if sentence

if that sentence is satisfied

I want to implement line 218 ( case G1_LEDOFF )

How do I do ?

I used "goto"

but i think that's not solution

That label is inside the function action(). You can't jump out of the loop() function into the middle of another function.

You should take all of that code inside that case block and put it into its own function. Give it a name. Then you can call that function from inside loop() AND from inside action(), depending on your requirements.

Design your program so that you don't need to use GOTO.

...R

I can think of 2 different approaches:

1 - All the code in the G1_LEDON case, put that in a separate function. Then you can call that function both from the G1_LEDON case, as well as from line 110.

2 - From line 110, call your action() function, but first set your variables so that you end up in the correct case.