Here is the complete mapbasic code that will serve your purpose ... Hope this helps ....
========================================================================================================
include "mapbasic.def"
include "Icons.def"
include "Menu.def"
Declare Sub Main
Sub Main
Dim Tabname,sColName,currcolumn,cmdstr as string
Dim x,y as integer
Dim currvalue as alias
//Opening up your table
Tabname = "C:\test.tab"
open table Tabname as inputtable
//Iterating through the table
If Tableinfo(inputtable,TAB_INFO_NROWS) <> 0 then
For x = 1 to TableInfo(inputtable,TAB_INFO_NROWS)
Fetch rec x from inputtable
For y=1 to TableInfo(inputtable, TAB_INFO_NCOLS)
sColName = ColumnInfo(inputtable, "col"+str$(y), COL_INFO_NAME)
currvalue = inputtable & "." & sColName
if currvalue = "-0.1" then
Update inputtable set sColName = -0.2 where rowid = x
elseif currvalue <> "-0.1" then
Update inputtable set sColName = currvalue where rowid = x
End If
Next
Next
Else
Note "No records in the input table, pls check "
End If
End Sub