Page parameter as partial's name?

I have a page parameter called foo with the value bar.html:

---
foo: "bar.html"
---

I would like to use this param to specify which partial to use. Is that possible in hugo? Something like this:

{{ partial .Params.foo . }}

The snippet above does not work since I get the following error:

Error while rendering "page": template bla/bla/bla/bla.html executing "main" at <.Params.foo>: invalid value; expected string

Try to cast foo into a string:

{{ partial (string .Params.foo) . }}