I hope you are aware of how to write SP in mysql .
Here is the logic for your query please do sandwitch this in SP.
SET @test = Select File_Data from tblachmaster WHERE Id IN (' + @ConditionVar + ')';
PREPARE stmt FROM @test;
EXECUTE stmt;
If you need more help give me some more time I will give you exact SP.
But please let me know the result of above solution.