SELECT COUNT(*) FROM MyTable WHERE AccountNumber=1234
Will return the number of matching records.
SELECT * FROM MyTable WHERE AccountNumber=1234
Will return all matching records.
You can just use the latter one and check if any records are returned - but exactly how in your C# code depends on how it currently works - and we can't see that.
But this might help:
Using PostgreSQL in your C# (.NET) application (An introduction)[
^]