Though PIVOT syntax is simple, I feel like newbies faces problem in understanding it. So adding to Abhinav's answer with the query you need.
DECLARE @ClientVisit TABLE ( ClientID INT, EmpName VARCHAR(50), Code VARCHAR(50))
INSERT INTO @ClientVisit VALUES (1, 'A', 'Visited')
INSERT INTO @ClientVisit VALUES (1, 'B', 'Ptp')
INSERT INTO @ClientVisit VALUES (1, 'A', 'Ptp')
INSERT INTO @ClientVisit VALUES (1, 'A', 'Visited')
INSERT INTO @ClientVisit VALUES (1, 'B', 'Visited')
INSERT INTO @ClientVisit VALUES (1, 'A', 'Visited')
INSERT INTO @ClientVisit VALUES (1, 'B', 'ptp')
SELECT EmpName, [Visited], [ptp]
FROM
(SELECT EmpName, Code
FROM @ClientVisit) As Souce
PIVOT (COUNT(Code) FOR Code IN ([Visited], [ptp])) As p