You are trying to solve a wrong problem. Have you ever wondered whey your table has so many empty cells? It is a sure sign of inadequate database design. Re-look into the database design, check out this example:
CREATE TABLE tablename
(
field1 varchar(255),
field2 varchar(255),
PRIMARY KEY (field1, field2)
)
INSERT INTO tablename
VALUES
('ABC', 'Customer'),
('ABC', 'Client'),
('ABC', 'Supplier'),
('DEF', 'Customer'),
('DEF', 'Client'),
('GHI', 'Client');
SELECT field1, [Customer], [Client], [Supplier]
FROM
(SELECT field1, field2 FROM tablename) as src
PIVOT
(
COUNT(field2) FOR field2 IN ([Customer], [Client], [Supplier] )
) AS output
or the live demo at
[
^]