Share the Error details.
and explain about your requirement so can understand the question.
If you just need to check if table exist in the DataBase then you need to use it like below.
SQL
DECLARE @Table_Name VARCHAR(MAX)
SET @Table_Name = 'Customer'
SELECT * FROM sys.tables Where name = @Table_Name
IF EXISTS(SELECT * FROM sys.tables Where name = @Table_Name)
BEGIN
SELECT 1
END