update table column if provided text is not matched I want to update a huge table, I can do the below in PHP but it will take longer time I believe. 

$string = "test string";
if($string!="Amazon.com"){
//set table column value as FBA
}

if($string=="Amazon.com"){
//set table column value as AMZ
}


Can I do this via MYSQL query ?

thanks
You can update all your table with query:

UPDATE table 
   SET value = IF(merchantDetails = "Amazon.com", "AMZ", "FBA");


where table and value should be changed to the actual names of table and field.