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]
IF EXISTS (SELECT * FROM sys.database_principals WHERE name = N'User_Name')
DROP USER [User_Name]

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