I want to change to Dynamic SQL Query instead of CASE statement
As mentioned by Dan Guzman in the comments, you can do this with UNION ALL instead of dynamic SQL:

select * 
from Employee e
    inner join department d 
        on e.departmentid=d.id
where d.departmentkeys=1 AND e.department1 = d.departmentvalues

UNION ALL

select * 
from Employee e
    inner join department d 
        on e.departmentid=d.id
where d.departmentkeys=2 AND e.department2 = d.departmentvalues

UNION ALL

select * 
from Employee e
    inner join department d 
        on e.departmentid=d.id
where d.departmentkeys=3 AND e.department3 = d.departmentvalues;


Akina mentioned another option, which is to use multiple left joins to the same table.  

This has the possibility of producing different results if there are any employees that don't have a department, and UNION ALL is probably a better option, performance-wise here.  But this is the general approach for the multiple join option:

select * from Employee e
left join department d1 
    on e.departmentid=d1.id and d1.departmentkeys=1 and e.department1=d1.departmentvalues
left join department d2
    on e.departmentid=d2.id and d2.departmentkeys=2 and e.department2=d2.departmentvalues
left join department d3
    on e.departmentid=d3.id and d3.departmentkeys=3 and e.department3=d3.departmentvalues