tSQL Stored Procedure with CTE; CASE statement in WHERE slowing run
Two big performance problems:


Your CSV splitter function is a major performance killer. Swap it out for Jeff Moden's DelimitedSplit8k function. You can read all about it here. Or better yet, swap it out for the CLR function or a table-valued parameter if you are on 2008+. Check out Aaron Bertrand's performance tests for the various CSV splitter functions. CLR is the winner overall. 
The table variable can be a big performance killer even if it only has 1 row. Switch it to a temporary table and add a clustered index to it. 


In your now provided execution plans, the function shows a 0% cost, but that is not the case. The function cost is higher, but you won't see the actual cost in the execution plan unless it's an inline table valued function. 


  Unfortunately, although I once had a runtime of 1 sec, by changing the
  SP and then back again, it takes 6 seconds again.


That smells of parameter sniffing.