How to update information of the data of column in the table matching the certain text? I have a condition where i need to update the only matched case of the data in the table. 
For an example
I have a #test table 

Sample data are

Firstname Lastname
ABCDEF    GHIJKL
BFGABCF   FGYUTY
CDFSERABC VVVVVV


I need an update query which match the 'ABC' in the #test table and update that 'ABC' with 'XYZ'. 

Resulting data must be 

Firstname Lastname
XYZDEF    GHIJKL
BFGXYZF   FGYUTY
CDFSERXYZ VVVVVV
Its easy : REPLACE (string_expression,string_pattern,string_replacement)

CREATE TABLE FirstLastName
    ([Firstname] varchar(9), [Lastname] varchar(6))
;

INSERT INTO FirstLastName
    ([Firstname], [Lastname])
VALUES
    ('ABCDEF', 'GHIJKL'),
    ('BFGABCF', 'FGYUTY'),
    ('CDFSERABC', 'VVVVVV')
;


select * from FirstLastName


--- now update the table 

update FirstLastName 
set Firstname = replace (Firstname,'ABC', 'XYZ')
-- optional (else it will do an upadte to entire table) !!
--where somecondition


SQLFIDDLE HERE