Select case cast(left(empdept,2) as INT)
WHEN 21 then 'Engineering'
when 23 then 'Maintenance'
END -- <<< THIS !!
Not sure what you mean by "locked". What happens if you do this in SSMS:
Navigate to the Procedure (depends on the version of SSMS but perhaps:
... ... Stored Procedures
... ... ... [YourProcedureName]
RightClick the procedure and choose MODIFY
If MODIFY is greyed-out then try scripting instead:
RightClick : Script Stored Procedure as : CREATE to : New Query Window
You will probably get a pop-up error message. If the Procedure is Encrypted that message will include "The text is encrypted", but its also possible that you lack Permission
RightClick : Properties will also indicate, under "Options", if the procedure is encrypted