SQL Server If statement assigning values
At a really basic level it would look like this

UPDATE TableName
SET [level] = CASE WHEN AcctNo = '1' THEN '1'
                    WHEN AcctNo = '2' THEN '2'
                    ELSE 'DefaultVal' END


or 

UPDATE TableName
SET [level] = CASE AcctNo WHEN '1' THEN '1'
                    WHEN '2' THEN '2'
                    ELSE 'DefaultVal' END


Depending on if you only need the one column in your conditions or if it's more complicated than that.

Edit  On looking at your expected data it looks like what you want is this:

WITH Levels AS (SELECT AcctNo, Level, 
        MIN(CASE WHEN code IN (1,2,3,4,5) THEN code ELSE NULL END) 
                OVER (PARTITION BY AcctNo) AS MinCode
        FROM Test)
UPDATE Levels
SET level = MinCode


Note: This assumes that you want the minimum code for a given AcctNo.

If you just want a select statement to test then change it to this:

WITH Levels AS (SELECT AcctNo, Code, Charge, Level, 
        MIN(CASE WHEN code IN (1,2,3,4,5) THEN code ELSE NULL END) 
                OVER (PARTITION BY AcctNo) AS MinCode
        FROM Test)
SELECT * FROM Levels