How to check if the User exists and Drop User from SQL Server Database

To check if the user exists and drop the user from SQL Server Database if it exists, you can use this code:

USE [Database_Name]
GO
IF EXISTS (SELECT * FROM sys.database_principals WHERE name = N'User_Name')
DROP USER [User_Name]
GO

It will drop the user from the database, without dropping the login from the SQL Server instance.