credo che dovresti sostituire
switch ($row )
con
switch ($row->DATA)
$row è un oggetto che contiene un campo DATA...non è un valore...un var dump di un valore restituisce un messaggio tipo:
string(1) "1"