Trigger if certain data matches - Mysql
SELECT @a := EXISTS ((SELECT 1 FROM load_data WHERE diIndex=3 and diMode=0 and diStatus=1));
IF @a = 1 THEN

       INSERT INTO logs(user_id,button_name,flag,box_name)
       VALUES("83","Plant","1","Trigger");

END IF;


or

IF EXISTS ((SELECT 1 FROM load_data WHERE diIndex=3 and diMode=0 and diStatus=1)) THEN
BEGIN
       INSERT INTO logs(user_id,button_name,flag,box_name)
       VALUES("83","Plant","1","Dark Red");
END;

ELSEIF EXISTS((SELECT 1 FROM load_data WHERE diIndex=1 and diMode=0 and diStatus=1)) THEN
BEGIN
       INSERT INTO logs(user_id,button_name,flag,box_name)
       VALUES("83","Plant","1","Yellow");
END;

ELSEIF EXISTS((SELECT 1 FROM load_data WHERE diIndex=3 and diMode=0 and diStatus=1)) THEN
BEGIN
       INSERT INTO logs(user_id,button_name,flag,box_name)
       VALUES("83","Plant","1","RED");
END;

END IF;