SELECT IF(base < 0 AND MOD(exponent, 1) != 0, 'Error: Invalid Input', POW(base, exponent)) AS result FROM your_table;