In my experience you can use the <img src="[FMP-Image: Containerfield]"> syntax only for images from the current database. A calculation that gets the image from another file will not display in CDML.
In your case this probably means using an inline in conjunction with an FMP-IF to display the image. For example
[FMP-IF: Field .eq. 1]
[FMP-InlineAction: -db=images, -lay=images, ImageName="gray",-find]<img src="[FMP-Image: Imagefield]">[/FMP-InlineAction]
[FMP-Else]
[FMP-InlineAction: -db=images, -lay=images, ImageName="green",-find]<img src="[FMP-Image: Imagefield]">[/FMP-InlineAction]
[/FMP-IF]
Hope this helps,
Wouter